<?php
/**
 * hognyi @taoding 2018.11.19
 *
 *
 */
namespace App\Logic;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Http\Resources\Agent as AgentResource;
use App\Models\Area;
use PhpParser\Node\Stmt\TryCatch;

class AreaLogic
{
	
	/**
	 * 表单数据
	 * @var array
	 */
	private $_post_data = array();
	
		
	public function __construct()
	{
		
	}
		
	static function getAreaName($id){	
		$area_name = '';
		if($id){
			$where[] = ['del_flag','=',0];
			$where[] = ['id','=',$id];
			$area_info = Area::where($where)->select('id','name','code','parent_id')->first();	
			$area_name = $area_info['name'];
		}
			
		return $area_name;
	}	
	
}